﻿using System;
using System.Windows.Browser;

namespace jLight.Extensions
{
    public static class jQueryExtensionsEffect
    {
        /// <summary>
        /// Perform a custom animation of a set of CSS properties.
        /// </summary>
        public static jQueryObject Animate(this jQueryObject value, jQueryEffectMap properties, jQueryEffectOptions options)
        {
            return value.Invoke("animate", properties.ScriptObject, options.ScriptObject);
        }
        /// <summary>
        /// Perform a custom animation of a set of CSS properties.
        /// </summary>
        public static jQueryObject Animate(this jQueryObject value, jQueryEffectMap properties)
        {
            return value.Invoke("animate", properties.ScriptObject);
        }
        /// <summary>
        /// Perform a custom animation of a set of CSS properties.
        /// </summary>
        public static jQueryObject Animate(this jQueryObject value, jQueryEffectMap properties, string duration)
        {
            return value.Invoke("animate", properties.ScriptObject, duration);
        }
        /// <summary>
        /// Perform a custom animation of a set of CSS properties.
        /// </summary>
        public static jQueryObject Animate(this jQueryObject value, jQueryEffectMap properties, double duration)
        {
            return value.Invoke("animate", properties.ScriptObject, duration);
        }
        /// <summary>
        /// Perform a custom animation of a set of CSS properties.
        /// </summary>
        public static jQueryObject Animate(this jQueryObject value, jQueryEffectMap properties, string duration, string easing)
        {
            return value.Invoke("animate", properties.ScriptObject, duration, easing);
        }
        /// <summary>
        /// Perform a custom animation of a set of CSS properties.
        /// </summary>
        public static jQueryObject Animate(this jQueryObject value, jQueryEffectMap properties, double duration, string easing)
        {
            return value.Invoke("animate", properties.ScriptObject, duration, easing);
        }
        /// <summary>
        /// Perform a custom animation of a set of CSS properties.
        /// </summary>
        public static jQueryObject Animate(this jQueryObject value, jQueryEffectMap properties, string duration, string easing, Func<object, object> callback)
        {
            return value.Invoke("animate", properties.ScriptObject, duration, easing, jQueryFunction.CreateCallback1(callback));
        }
        /// <summary>
        /// Perform a custom animation of a set of CSS properties.
        /// </summary>
        public static jQueryObject Animate(this jQueryObject value, jQueryEffectMap properties, double duration, string easing, Func<object, object> callback)
        {
            return value.Invoke("animate", properties.ScriptObject, duration, easing, jQueryFunction.CreateCallback1(callback));
        }

        /// <summary>
        /// Remove from the queue all items that have not yet been run.
        /// </summary>
        public static jQueryObject ClearQueue(this jQueryObject value, string queueName)
        {
            return value.Invoke("clearQueue", queueName);
        }
        /// <summary>
        /// Remove from the queue all items that have not yet been run.
        /// </summary>
        public static jQueryObject ClearQueue(this jQueryObject value)
        {
            return value.Invoke("clearQueue");
        }

        /// <summary>
        /// Set a timer to delay execution of subsequent items in the queue.
        /// </summary>
        public static jQueryObject Delay(this jQueryObject value, int duration, string queueName)
        {
            return value.Invoke("delay", duration, queueName);
        }
        /// <summary>
        /// Set a timer to delay execution of subsequent items in the queue.
        /// </summary>
        public static jQueryObject Delay(this jQueryObject value, int duration)
        {
            return value.Invoke("delay", duration);
        }

        /// <summary>
        /// Execute the next function on the queue for the matched elements.
        /// </summary>
        public static jQueryObject Dequeue(this jQueryObject value, string queueName)
        {
            return value.Invoke("dequeue", queueName);
        }
        /// <summary>
        /// Execute the next function on the queue for the matched elements.
        /// </summary>
        public static jQueryObject Dequeue(this jQueryObject value)
        {
            return value.Invoke("dequeue");
        }

        /// <summary>
        /// Show the queue of functions to be executed on the matched elements.
        /// </summary>
        public static jQueryObject Queue(this jQueryObject value, string queueName)
        {
            return value.Invoke("queue", queueName);
        }

        /// <summary>
        /// Stop the currently-running animation on the matched elements.
        /// </summary>
        public static jQueryObject Stop(this jQueryObject value)
        {
            return value.Invoke("stop");
        }
        /// <summary>
        /// Stop the currently-running animation on the matched elements.
        /// </summary>
        public static jQueryObject Stop(this jQueryObject value, bool clearQueue, bool jumpToEnd)
        {
            return value.Invoke("stop", clearQueue, jumpToEnd);
        }
        /// <summary>
        /// Stop the currently-running animation on the matched elements.
        /// </summary>
        public static jQueryObject Stop(this jQueryObject value, bool clearQueue)
        {
            return value.Invoke("stop", clearQueue);
        }

        /// <summary>
        /// Display the matched elements by fading them to opaque.
        /// </summary>
        public static jQueryObject FadeIn(this jQueryObject value)
        {
            return value.Invoke("fadeIn");
        }
        /// <summary>
        /// Display the matched elements by fading them to opaque.
        /// </summary>
        public static jQueryObject FadeIn(this jQueryObject value, string duration)
        {
            return value.Invoke("fadeIn", duration);
        }
        /// <summary>
        /// Display the matched elements by fading them to opaque.
        /// </summary>
        public static jQueryObject FadeIn(this jQueryObject value, double duration)
        {
            return value.Invoke("fadeIn", duration);
        }
        /// <summary>
        /// Display the matched elements by fading them to opaque.
        /// </summary>
        public static jQueryObject FadeIn(this jQueryObject value, string duration, Func<object, object> callback)
        {
            return value.Invoke("fadeIn", duration, jQueryFunction.CreateCallback1(callback));
        }
        /// <summary>
        /// Display the matched elements by fading them to opaque.
        /// </summary>
        public static jQueryObject FadeIn(this jQueryObject value, double duration, Func<object, object> callback)
        {
            return value.Invoke("fadeIn", duration, jQueryFunction.CreateCallback1(callback));
        }

        /// <summary>
        /// Hide the matched elements by fading them to transparent.
        /// </summary>
        public static jQueryObject FadeOut(this jQueryObject value)
        {
            return value.Invoke("fadeOut");
        }
        /// <summary>
        /// Hide the matched elements by fading them to transparent.
        /// </summary>
        public static jQueryObject FadeOut(this jQueryObject value, string duration)
        {
            return value.Invoke("fadeOut", duration);
        }
        /// <summary>
        /// Hide the matched elements by fading them to transparent.
        /// </summary>
        public static jQueryObject FadeOut(this jQueryObject value, double duration)
        {
            return value.Invoke("fadeOut", duration);
        }
        /// <summary>
        /// Hide the matched elements by fading them to transparent.
        /// </summary>
        public static jQueryObject FadeOut(this jQueryObject value, string duration, Func<object, object> callback)
        {
            return value.Invoke("fadeOut", duration, jQueryFunction.CreateCallback1(callback));
        }
        /// <summary>
        /// Hide the matched elements by fading them to transparent.
        /// </summary>
        public static jQueryObject FadeOut(this jQueryObject value, double duration, Func<object, object> callback)
        {
            return value.Invoke("fadeOut", duration, jQueryFunction.CreateCallback1(callback));
        }

        /// <summary>
        /// Adjust the opacity of the matched elements.
        /// </summary>
        public static jQueryObject FadeTo(this jQueryObject value, string duration, double opacity)
        {
            return value.Invoke("fadeTo", duration,opacity);
        }
        /// <summary>
        /// Adjust the opacity of the matched elements.
        /// </summary>
        public static jQueryObject FadeTo(this jQueryObject value, double duration, double opacity)
        {
            return value.Invoke("fadeTo", duration, opacity);
        }
        /// <summary>
        /// Adjust the opacity of the matched elements.
        /// </summary>
        public static jQueryObject FadeTo(this jQueryObject value, string duration, double opacity, Func<object, object> callback)
        {
            return value.Invoke("fadeTo", duration, opacity, jQueryFunction.CreateCallback1(callback));
        }
        /// <summary>
        /// Adjust the opacity of the matched elements.
        /// </summary>
        public static jQueryObject FadeTo(this jQueryObject value, double duration, double opacity, Func<object, object> callback)
        {
            return value.Invoke("fadeTo", duration, opacity, jQueryFunction.CreateCallback1(callback));
        }

        /// <summary>
        /// Display the matched elements with a sliding motion.
        /// </summary>
        public static jQueryObject SlideDown(this jQueryObject value, string duration)
        {
            return value.Invoke("slideDown", duration);
        }
        /// <summary>
        /// Display the matched elements with a sliding motion.
        /// </summary>
        public static jQueryObject SlideDown(this jQueryObject value, double duration)
        {
            return value.Invoke("slideDown", duration);
        }
        /// <summary>
        /// Display the matched elements with a sliding motion.
        /// </summary>
        public static jQueryObject SlideDown(this jQueryObject value, string duration, Func<object, object> callback)
        {
            return value.Invoke("slideDown", duration, jQueryFunction.CreateCallback1(callback));
        }
        /// <summary>
        /// Display the matched elements with a sliding motion.
        /// </summary>
        public static jQueryObject SlideDown(this jQueryObject value, double duration, Func<object, object> callback)
        {
            return value.Invoke("slideDown", duration, jQueryFunction.CreateCallback1(callback));
        }


        /// <summary>
        /// Display or hide the matched elements with a sliding motion.
        /// </summary>
        public static jQueryObject SlideToggle(this jQueryObject value, string duration)
        {
            return value.Invoke("slideToggle", duration);
        }
        /// <summary>
        /// Display or hide the matched elements with a sliding motion.
        /// </summary>
        public static jQueryObject SlideToggle(this jQueryObject value, double duration)
        {
            return value.Invoke("slideToggle", duration);
        }
        /// <summary>
        /// Display or hide the matched elements with a sliding motion.
        /// </summary>
        public static jQueryObject SlideToggle(this jQueryObject value, string duration, Func<object, object> callback)
        {
            return value.Invoke("slideToggle", duration, jQueryFunction.CreateCallback1(callback));
        }
        /// <summary>
        /// Display or hide the matched elements with a sliding motion.
        /// </summary>
        public static jQueryObject SlideToggle(this jQueryObject value, double duration, Func<object, object> callback)
        {
            return value.Invoke("slideToggle", duration, jQueryFunction.CreateCallback1(callback));
        }

        /// <summary>
        /// Hide the matched elements with a sliding motion.
        /// </summary>
        public static jQueryObject SlideUp(this jQueryObject value, string duration)
        {
            return value.Invoke("slideUp", duration);
        }
        /// <summary>
        /// Hide the matched elements with a sliding motion.
        /// </summary>
        public static jQueryObject SlideUp(this jQueryObject value, double duration)
        {
            return value.Invoke("slideUp", duration);
        }
        /// <summary>
        /// Hide the matched elements with a sliding motion.
        /// </summary>
        public static jQueryObject SlideUp(this jQueryObject value, string duration, Func<object, object> callback)
        {
            return value.Invoke("slideUp", duration, jQueryFunction.CreateCallback1(callback));
        }
        /// <summary>
        /// Hide the matched elements with a sliding motion.
        /// </summary>
        public static jQueryObject SlideUp(this jQueryObject value, double duration, Func<object, object> callback)
        {
            return value.Invoke("slideUp", duration, jQueryFunction.CreateCallback1(callback));
        }

    }
}